package vn.com.vega.chacha.v2.Asynctask;

import java.lang.ref.WeakReference;

import vn.com.vega.chacha.v2.ActivityBase;

import android.os.AsyncTask;

public class BaseAsyncTask extends AsyncTask<Void, Void, Void> {
	protected WeakReference<ActivityBase> baseActivityRfc;
	
	public BaseAsyncTask(ActivityBase base) {
		baseActivityRfc = new WeakReference<ActivityBase>(base);
	}
	
	protected boolean checkIsLive() {
		ActivityBase act = baseActivityRfc.get();
		if (act == null || act.isDestroy) {
			return false;
		}
		return true;
	}
	
	@Override
	protected Void doInBackground(Void... params) {
		// TODO Auto-generated method stub
		return null;
	}

}
